<div class="tableToolbar">
    <div class="coll-md-8" id="addInput">
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="红包名称" ng-model="ctrlScope.itemsearch.name">
        </div>
        <!--<div class="coll-md-1 scalenone" id="search2">-->
            <!--<div class="coll-md-10 triangle">-->
                <!--<select class="form-control" ng-model="ctrlScope.itemsearch.status">-->
                    <!--<option selected hidden disabled value="">状态</option>-->
                    <!--<option value="3">停用</option>-->
                    <!--<option value="1">审核未激活</option>-->
                    <!--<option value="2">激活</option>-->
                    <!--<option value="4">过期</option>-->
                    <!--<option value="0">待审核</option>-->
                <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <div class="coll-md-4 scalenone"  id="searchdate" datahide>
            <div class="coll-md-5" >
                <p class="input-group">
                    <input type="text" class="search" placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.beginDateX" is-open="popup1.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
            <div class="coll-md-5">
                <p class="input-group inline">
                    <input type="text" class="search" placeholder="结束时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.endDateX" is-open="popup2.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
        </div>
        <div class="coll-md-2">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                    <!--<li><a href="javascript:;">状态搜索</a></li>-->
                </ul>
            </div>
        </div>
    </div>
    <div class="coll-md-2">
        <input type="button" class="bttn pos-right"  ng-click="addOrderModal()" value="新建红包">
    </div>
</div>
<table ui-table="orderParams">
    <thead>
    <tr>
        <th>名称</th>
        <th>创建时间</th>
        <th>创建者</th>
        <th>活动时间</th>
        <th>状态</th>
        <th>发放数量</th>
        <th>领用</th>
        <th>使用</th>
        <th>过期</th>
        <th>操作</th>
        <th>审核</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td><a ng-click="checkByName(item.id)">{{item.name}}</a></td>
        <td>{{item.addtime | date:'yyyy-MM-dd  HH:mm:ss'}}</td>
        <td>{{item.userName}}</td>
        <td>{{item.beginTime | date:'yyyy-MM-dd  HH:mm:ss'}} -- {{item.endTime | date:'yyyy-MM-dd  HH:mm:ss'}}</td>
        <td>{{item.status | ruleStatus}}</td>
        <td>{{item.totalCount }}</td>
        <td>{{item.receiveCount}}</td>
        <td>{{item.usedCount}}</td>
        <td>{{item.overdueCount}}</td>
        <td title="操作">
            <a  ng-click="openViewModal(item.id)">查看</a>
            <a  ng-if='item.status!=4 && item.status!=3' ng-click="openStopModal(item.id)">停用</a>
            <a  ng-if='item.status!=4 && item.status!=2' ng-click="openStartModal(item.id)">启用</a>
            <a  ng-if='item.status==0' ng-click="openEditModal(item.id)">修改</a>
        </td>
        <td title="审核">
            <a   ng-if='item.status==0' ng-click="openCheckModal(item.id)">待审核</a>
            <em  ng-if='item.status==1'>审核未激活</em>
            <em  ng-if='item.status==2'>已激活</em>
            <em  ng-if='item.status==3'>已停用</em>
            <em  ng-if='item.status==4'>已过期</em>
        </td>
    </tr>
    </tbody>
</table>

<modal title="查看红包明细表" visible="viewRuleModal">
    <form class="form-horizontal" role="form">
        <div class="form-body">
            <table ui-table="orderParams1">
                <thead>
                <tr>
                    <th>用户名</th>
                    <th>状态</th>
                    <th>红包金额</th>
                    <th>领用时间</th>
                    <th>使用时间</th>
                    <th>投资记录</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in orderParams1.$rows">
                    <td>{{item.username}}</td>
                    <td>{{item.status | ruleStatus}}</td>
                    <td>{{item.amount}}元</td>
                    <td>{{item.addtime | date:'yyyy-MM-dd  HH:mm:ss'}}</td>
                    <td>{{item.useTime | date:'yyyy-MM-dd  HH:mm:ss'}}</td>
                    <td>对【{{item.itemName}}】投资成功，冻结投资者的世纪投资金额{{item.investDealAmount}}元，红包抵扣{{item.amount}}元</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="buttonArea col-md-12">
            <button type="button"  class="btn blue"  ng-click="download()">导出</button>
        </div>
    </form>
</modal>
<modal title="红包规则管理" visible="itemAddModal">
    <form class="form-horizontal" role="form" name="myForm" ng-submit="submitForm(myForm.$valid)" novalidate>
        <div class="form-body">
            <ul id="myTab" class="nav nav-tabs">
                <li class="active"><a  href="#item1" data-toggle="tab">红包规则</a></li>
                <li><a  href="#item2" data-toggle="tab">红包内容</a></li>
                <li><a  href="#item3" data-toggle="tab">用户筛选</a></li>
            </ul>
            <div class="tab-content" style="margin-top:10px;">
                <div class="tab-pane fade in active" id="item1" >
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">活动名称</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" required   name="itemName" ng-model="ctrlScope.rule.name" placeholder="活动名称">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="control-label col-md-2">规则有效期</label>
                        <div class="col-md-3">
                            <p class="input-group inline">
                                <input type="text" class="form-control" required placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"
                                       ng-model="ctrlScope.rule.beginTime" is-open="popup1.opened" datepicker-options="dateOptions"
                                       ng-minlength="1" required/>
                                    <span class="input-group-btn">
                                    <button type="button" class="btn btn-default" ng-click="open1()"><i
                                            class="glyphicon glyphicon-calendar"></i></button>
                                    </span>
                            </p>
                        </div>
                        <div class="col-md-3">
                            <p class="input-group inline">
                                <input type="text" class="form-control" required placeholder="结束时间" uib-datepicker-popup="yyyy-MM-dd"
                                       ng-model="ctrlScope.rule.endTime" is-open="popup2.opened" datepicker-options="dateOptions"
                                       ng-minlength="1" required/>
                                    <span class="input-group-btn">
                                    <button type="button" class="btn btn-default" ng-click="open2()"><i
                                            class="glyphicon glyphicon-calendar"></i></button>
                                    </span>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="control-label col-md-2">触发规则</label>
                        <div class="col-md-10">
                            <div class="form-group">
                                <div class="col-md-12">
                                    <label class="radio-inline">
                                        <input type="radio" name="rule" value="1" ng-model="ctrlScope.ruleParent.nid" required>
                                        立即发放 </label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="10" ng-model="ctrlScope.ruleParent.nid" required>
                                        分享 </label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="11" ng-model="ctrlScope.ruleParent.nid" required>
                                        拉新 </label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="12" ng-model="ctrlScope.ruleParent.nid" required>
                                        单次投资金额 </label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="14" ng-model="ctrlScope.ruleParent.nid" required>
                                        期限内投资总额 </label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="8" ng-model="ctrlScope.ruleParent.nid" required>
                                        充值</label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="9" ng-model="ctrlScope.ruleParent.nid" required>
                                        自动锁标</label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="13" ng-model="ctrlScope.ruleParent.nid" required>
                                        兑换码</label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="rule" value="15" ng-model="ctrlScope.ruleParent.nid" required>
                                        注册</label>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

                    <div class="row" ng-if="ctrlScope.ruleParent.nid==13">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">输入兑换码</label>
                                <div class="col-md-8">
                                    <input type="number" class="form-control"  ng-model="ctrlScope.rule.redeemCode" required>
                                </div>
                            </div>
                        </div>
                    </div>
            <div class="row" ng-if="ctrlScope.ruleParent.nid==10">
                <div class="col-md-2">
                    <div class="form-group">
                        <label class="control-label col-md-12">分享方式</label>
                    </div>
                </div>
                <div class="col-md-8">
                    <div class="form-group">

                        <div class="col-md-6">
                            <label class="radio-inline">
                                <input type="radio" name="ruleChild1"  value='2' ng-model="ctrlScope.rule1.nid" required>
                                标的 </label>

                            <label class="radio-inline">
                                <input type="radio" name="ruleChild1"  value='3' ng-model="ctrlScope.rule1.nid" required>
                                邀请 </label>

                        </div>

                    </div>
                </div>
            </div>

            <div class="row"  ng-if="ctrlScope.ruleParent.nid==11">
                <div class="col-md-2">
                    <div class="form-group">
                        <label class="control-label col-md-12">拉新方式</label>
                    </div>
                </div>
                <div class="col-md-8">
                    <div class="form-group">

                        <div class="col-md-6">
                            <label class="radio-inline">
                                <input type="radio" name="ruleChild2"  value='4' ng-model="ctrlScope.rule2.nid" required>
                                实名认证 </label>

                            <label class="radio-inline">
                                <input type="radio" name="ruleChild2" value='5'  ng-model="ctrlScope.rule2.nid" required>
                                首次投资 </label>

                        </div>
                    </div>
                </div>
            </div>

            <div class="row" ng-if="ctrlScope.ruleParent.nid==12">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4 radio-inline">
                            <input type="radio" name="ruleChild3" value='6'  ng-model="ctrlScope.rule3.nid"  required>
                            投资满额 </label>
                        <div class="col-md-8 yuan">
                            <input type="number" class="form-control" ng-model="ctrlScope.rule.minimumAmount6">
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4 radio-inline">
                            <input type="radio" name="ruleChild3" value='7'  ng-model="ctrlScope.rule3.nid" required>
                            首次投资 </label>
                        <div class="col-md-8 yuan">
                            <input type="number" class="form-control"  ng-model="ctrlScope.rule.minimumAmount7">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row" ng-if="ctrlScope.ruleParent.nid==8">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">充值满额 </label>
                        <div class="col-md-8 yuan">
                            <input type="number" class="form-control"  ng-model="ctrlScope.rule.minimumAmount8" required>
                        </div>
                    </div>
                </div>
            </div>
                    <div class="row" ng-if="ctrlScope.ruleParent.nid==14">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">投资总额</label>
                                <div class="col-md-8 yuan">
                                    <input type="number" class="form-control"  ng-model="ctrlScope.rule.minimumAmount9" required>
                                </div>
                            </div>
                        </div>
                    </div>

            <div class="row" ng-if="ctrlScope.ruleParent.nid==9">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">自动锁标期限</label>
                        <div class="col-md-8 tian">
                            <input type="number" class="form-control"  ng-model="ctrlScope.rule.days" required>
                        </div>
                    </div>
                </div>
            </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">限领类型</label>
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <label class="radio-inline">
                                                <input type="radio" name="limit" value="0" ng-model="ctrlScope.rule.limitType" required>
                                                每日限领 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="limit" value="1" ng-model="ctrlScope.rule.limitType" required>
                                                总限领 </label>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">限领次数</label>
                                <div class="col-md-8">
                                    <input type="number" class="form-control" required   ng-model="ctrlScope.rule.totalLimit" placeholder="限领次数">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">总发放数量</label>
                                <div class="col-md-8">
                                    <input type="number" class="form-control"   ng-model="ctrlScope.rule.totalCount" required  placeholder="总发放数量">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">跳转地址</label>
                                <div class="col-md-8">
                                    <input type="url" class="form-control"   ng-model="ctrlScope.rule.jumpPage"   placeholder="跳转地址">
                                </div>
                            </div>
                        </div>
                    </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="control-label col-md-2">是否启用通知</label>
                        <div class="col-md-10">
                            <div class="form-group">
                                <div class="col-md-12">
                                    <label class="radio-inline">
                                        <input type="radio" name="announce1" value="1" ng-model="ctrlScope.ruleAnnounce.announce" required>
                                        是 </label>
                                    <label class="radio-inline">
                                        <input type="radio"   name="announce1" value="0" ng-model="ctrlScope.ruleAnnounce.announce" required>
                                        否 </label>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <div class="row" ng-if="ctrlScope.ruleAnnounce.announce==1">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="control-label col-md-2">通知方式</label>
                        <div class="col-md-10">
                            <div class="form-group">
                                <div class="col-md-12">
                                    <label class="checkbox-inline">
                                        <input type="checkbox"  ng-model="ctrlScope.ruleAnnounce.whetherSms">
                                        短信 </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox"  ng-model="ctrlScope.ruleAnnounce.whetherMail">
                                        站内信 </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" ng-model="ctrlScope.ruleAnnounce.whetherAppPush">
                                        app推送 </label>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>

                <!--<div class="col-md-12">-->
                        <!--<div class="form-group">-->
                            <!--<label class="control-label col-md-2">发送时间</label>-->

                            <!--<div class="col-md-3">-->

                                    <!--<p class="input-group inline">-->
                                        <!--<input type="text" class="form-control"  placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"-->
                                               <!--ng-model="ctrlScope.user.beginInvestTimex" is-open="popup3.opened" datepicker-options="dateOptions"/>-->
                                        <!--<span class="input-group-btn">-->
                                        <!--<button type="button" class="btn btn-default" ng-click="open3()"><i-->
                                                <!--class="glyphicon glyphicon-calendar"></i></button>-->
                                        <!--</span>-->
                                    <!--</p>-->

                            <!--</div>-->
                            <!--<div class="coll-md-1">-->
                                <!--<select ng-model="message.hour" class="form-control" ui-select2="selectOptions" required>-->
                                    <!--<option value="" disabled selected hidden>时</option>-->
                                    <!--<option ng-repeat="hour in getHours()" value="{{hour}}">{{hour}}</option>-->
                                <!--</select>-->
                            <!--</div>-->
                            <!--<div class="coll-md-1">-->
                                <!--<select ng-model="message.min" class="form-control" ui-select2="selectOptions" required>-->
                                    <!--<option value="" disabled selected hidden>分</option>-->
                                    <!--<option ng-repeat="min in getMins()" value="{{min}}">{{min}}</option>-->
                                <!--</select>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->

                <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">通知内容</label>
                            <div class="col-md-10">
                                <textarea ng-model="ctrlScope.rule.noticeContent" required></textarea>
                            </div>
                        </div>
                    </div>


            </div>

                    </div>
                <div id="item2" class="tab-pane fade">
                    <div ng-if="isCreate">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <div class="col-md-10">
                                            <label class="radio-inline">
                                                <input type="radio" name="type"  value='1' ng-model="ctrlScope.rule.ticketType" required>
                                                红包 </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="type"  value='2' ng-model="ctrlScope.rule.ticketType" required>
                                                加息券 </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="type"  value='3' ng-model="ctrlScope.rule.ticketType" required>
                                                抽奖券 </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ng-if="!isCreate">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <div class="col-md-10">
                                            <label class="radio-inline">
                                                <input type="radio" name="type"  value='1' ng-model="ctrlScope.rule.ticketType" disabled>
                                                红包 </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="type"  value='2' ng-model="ctrlScope.rule.ticketType" disabled>
                                                加息券 </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="type"  value='3' ng-model="ctrlScope.rule.ticketType" disabled>
                                                抽奖券 </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ng-if='isCreate && ctrlScope.rule.ticketType==1'>
                <div class="row" style='margin-bottom:12px;' ng-repeat="i in arr" >
                    <div class="col-md-1">
                        <label  class="control-label col-md-12">{{i.index}}</label>
                    </div>

                    <div class="col-md-2">
                        红包金额
                        <div class="yuan">
                            <input type="number" required class="form-control"
                                   ng-model="ctrlScope.content.amount[$index]">
                        </div>
                    </div>

                    <div class="col-md-2">
                        可用门槛
                        <div class="yuan">
                            <input type="number" required class="form-control"
                                   ng-model="ctrlScope.content.requireAmount[$index]">
                        </div>
                    </div>
                    <div class="col-md-2">
                        有效期
                        <div class="tian">
                            <input type="number" required class="form-control"
                                   ng-model="ctrlScope.content.expiredLife[$index]">
                        </div>
                    </div>
                    <div class="col-md-3">
                        标的满足天数
                        <div class="tian">
                            <input type="number" required class="form-control"
                                   ng-model="ctrlScope.content.scope[$index]">
                        </div>
                    </div>
                </div>
                    <div class="row" style="text-align: right;margin-right:8px;">
                        <button type="button" class="btn red" ng-click="add()">添加</button>
                        <button type="button" class="btn" ng-click="delete()">删除</button>
                    </div>
                    </div>
                    <div ng-if='!isCreate && ctrlScope.rule.ticketType==1'>
                <div class="row"  style='margin-bottom:12px;' ng-repeat="item in dataCoupon track by $index">
                    <div class="col-md-1">
                        <label  class="control-label col-md-12">{{$index + 1}}</label>
                    </div>
                    <div class="col-md-2">
                        红包金额
                        <div class="yuan">
                            <input type="number" required class="form-control"
                                   ng-model="item.amount">
                        </div>
                    </div>

                    <div class="col-md-2">
                        可用门槛
                        <div class="yuan">
                            <input type="number" required class="form-control"
                                   ng-model="item.requireAmount">
                        </div>
                    </div>
                    <div class="col-md-2">
                        有效期
                        <div class="tian">
                            <input type="number" required class="form-control"
                                   ng-model="item.expiredLife">
                        </div>
                    </div>
                    <div class="col-md-3">
                        标的满足天数
                        <div class="tian">
                            <input type="number" required class="form-control"
                                   ng-model="item.scope">
                        </div>
                    </div>
                    <div class="col-md-2">
                        是否禁用
                        <div class="">
                            <select required ng-model="item.status" class="form-control"
                                    ui-select2="select2Options">
                                <option value="0">禁用</option>
                                <option value="1">启用</option>
                            </select>
                        </div>
                        <!--<span style="opacity:0">是否禁用</span>-->
                        <!--<div>-->
                            <!--<label class="radio-inline">-->
                                <!--<input type="radio" name="status[$index]"  value='0' ng-model="item.status" >-->
                                <!--禁用</label>-->
                            <!--<label class="radio-inline">-->
                                <!--<input type="radio" name="status[$index]" value='1' ng-model="item.status" >-->
                                <!--启用</label>-->
                        <!--</div>-->
                    </div>
                </div>
                <div class="row" style="text-align: right;margin-right:8px;">
                    <button type="button" class="btn red" ng-click="addone()">添加</button>
                    <button type="button" class="btn" ng-click="deleteone()" ng-disabled="true">删除</button>
                </div>
</div>

                    <div ng-if='isCreate && ctrlScope.rule.ticketType==2'>
                        <div class="row" style='margin-bottom:12px;' ng-repeat="i in arr" >
                            <div class="col-md-1">
                                <label  class="control-label col-md-12">{{i.index}}</label>
                            </div>
                            <div class="col-md-2">
                                作用时间
                                <div class="tian">
                                    <input type="number" required class="form-control"
                                           ng-model="ctrlScope.content.usefulLife[$index]">
                                </div>
                            </div>
                            <div class="col-md-2">
                                加息比例
                                <div class="percent">
                                    <input type="number" required class="form-control"
                                           ng-model="ctrlScope.content.rate[$index]">
                                </div>
                            </div>
                            <div class="col-md-2">
                                可用门槛
                                <div class="yuan">
                                    <input type="number" required class="form-control"
                                           ng-model="ctrlScope.content.requireAmount[$index]">
                                </div>
                            </div>
                            <div class="col-md-2">
                                有效期
                                <div class="tian">
                                    <input type="number" required class="form-control"
                                           ng-model="ctrlScope.content.expiredLife[$index]">
                                </div>
                            </div>
                            <div class="col-md-3">
                                标的满足天数
                                <div class="tian">
                                    <input type="number" required class="form-control"
                                           ng-model="ctrlScope.content.scope[$index]">
                                </div>
                            </div>
                        </div>
                        <div class="row" style="text-align: right;margin-right:8px;">
                            <button type="button" class="btn red" ng-click="add()">添加</button>
                            <button type="button" class="btn" ng-click="delete()">删除</button>
                        </div>
                    </div>
                    <div ng-if='!isCreate && ctrlScope.rule.ticketType==2'>
                        <div class="row"  style='margin-bottom:12px;' ng-repeat="item in dataCoupon track by $index">
                            <!--<div class="col-md-1">-->
                                <!--<label  class="control-label col-md-12">{{$index + 1}}</label>-->
                            <!--</div>-->

                            <div class="col-md-2">
                                {{$index + 1}} 作用时间
                                <div class="tian">
                                    <input type="number" required class="form-control"
                                           ng-model="item.usefulLife">
                                </div>
                            </div>
                            <div class="col-md-2">
                                加息比例
                                <div class="percent">
                                    <input type="number" required class="form-control"
                                           ng-model="item.rate">
                                </div>
                            </div>
                            <div class="col-md-2">
                                可用门槛
                                <div class="yuan">
                                    <input type="number" required class="form-control"
                                           ng-model="item.requireAmount">
                                </div>
                            </div>
                            <div class="col-md-2">
                                有效期
                                <div class="tian">
                                    <input type="number" required class="form-control"
                                           ng-model="item.expiredLife">
                                </div>
                            </div>
                            <div class="col-md-2">
                                标的满足天数
                                <div class="tian">
                                    <input type="number" required class="form-control"
                                           ng-model="item.scope">
                                </div>
                            </div>
                            <div class="col-md-2">
                                是否禁用
                                <div class="">
                                    <select required ng-model="item.status" class="form-control"
                                            ui-select2="select2Options">
                                        <option value="0">禁用</option>
                                        <option value="1">启用</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row" style="text-align: right;margin-right:8px;">
                            <button type="button" class="btn red" ng-click="addone()">添加</button>
                            <button type="button" class="btn" ng-click="deleteone()" disabled ng-if="true">删除</button>
                        </div>
                    </div>

                    <div ng-if='isCreate && ctrlScope.rule.ticketType==3'>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label col-md-4">有效期</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control"  required   ng-model="ctrlScope.content.expired" placeholder="有效期">

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div ng-if='!isCreate && ctrlScope.rule.ticketType==3'>
                        <div class="row"  ng-repeat="item in dataCoupon track by $index">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label col-md-4">有效期</label>
                                    <div class="col-md-8 tian">
                                        <input type="text" class="form-control"  required   ng-model="item.expiredLife" placeholder="有效期">

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
            </div>
                <div id="item3" class="tab-pane fade">
                    <div ng-if="isCreate">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <div class="col-md-10">
                                        <div class="col-md-9">
                                            <label class="radio-inline">
                                                <input type="radio" name="ruleChild11"  value='0' ng-model="ctrlScope.rule.usersType" required>
                                                所有人 </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="ruleChild11"  value='1' ng-model="ctrlScope.rule.usersType" required>
                                                条件筛选 </label>

                                        </div>
                                    </div>
                                    <div class="col-md-2" ng-if="ctrlScope.rule.usersType==1">
                                        <button type="button" class="btn red"   ng-click="userSearch()" >搜索</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div ng-if="ctrlScope.rule.usersType==1">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label class="control-label col-md-2">单次投资金额</label>
                                        <div class="col-md-3 yuan">
                                            <input type="number" class="form-control"    name="itemName" ng-model="ctrlScope.user.singleInvestAmout" placeholder="单次投资金额">
                                        </div>

                                    </div>
                                </div>
                                <!--<div class="col-md-6">-->
                                    <!--<div class="form-group">-->
                                        <!--<label class="control-label col-md-4">投资总金额</label>-->
                                        <!--<div class="col-md-8 yuan">-->
                                            <!--<input type="text" class="form-control"    name="itemName" ng-model="ctrlScope.user.investTotalAmount" placeholder="投资金额">-->
                                        <!--</div>-->
                                    <!--</div>-->
                                <!--</div>-->
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label class="control-label col-md-2">时间区间</label>
                                        <div class="col-md-3">
                                            <p class="input-group inline">
                                                <input type="text" class="form-control"  placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"
                                                       ng-model="ctrlScope.user.beginInvestTimex" is-open="popup3.opened" datepicker-options="dateOptions"/>
                                    <span class="input-group-btn">
                                    <button type="button" class="btn btn-default" ng-click="open3()"><i
                                            class="glyphicon glyphicon-calendar"></i></button>
                                    </span>
                                            </p>
                                        </div>
                                        <div class="col-md-3">
                                            <p class="input-group inline">
                                                <input type="text" class="form-control"  placeholder="结束时间" uib-datepicker-popup="yyyy-MM-dd"
                                                       ng-model="ctrlScope.user.endInvestTimex" is-open="popup4.opened" datepicker-options="dateOptions"/>
                                    <span class="input-group-btn">
                                    <button type="button" class="btn btn-default" ng-click="open4()"><i
                                            class="glyphicon glyphicon-calendar"></i></button>
                                    </span>
                                            </p>
                                        </div>


                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label class="control-label col-md-2">投资金额范围</label>
                                        <div class="col-md-3 yuan">
                                            <input type="number" class="form-control"    name="itemName" ng-model="ctrlScope.user.minInvestTotalAmount" placeholder="最低投资金额">
                                        </div>
                                        <div class="col-md-3 yuan">
                                            <input type="number" class="form-control"    name="itemName" ng-model="ctrlScope.user.maxInvestTotalAmount" placeholder="最高投资金额">
                                        </div>
                                    </div>
                                </div>
                            </div>


                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="control-label col-md-2">邀请人(用户名用逗号隔开)</label>
                                    <div class="col-md-10">
                                        <textarea ng-model="ctrlScope.inviteUserNames"></textarea>
                                        <a ng-click="listInputInvite()">点击获取列表</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                          <div class="row">
                              <div class="col-md-12">
                                  <div class="form-group">
                                      <label class="control-label col-md-2">指定用户(用户名用逗号隔开)</label>
                                      <div class="col-md-10">
                                          <textarea  ng-model="ctrlScope.userNames"></textarea>
                                          <a ng-click="listInputUser()">点击获取列表</a>
                                      </div>
                                  </div>
                              </div>
                          </div>

                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label col-md-4">邀请人上传</label>
                                        <div class="col-md-8">
                                            <input style='position: relative;opacity: 1' type="file" class="form-control"   ngf-select="upload1($file)">
                                        </div>

                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label col-md-4">指定用户上传</label>
                                        <div class="col-md-8">
                                            <input type="file" style='position: relative;opacity: 1' class="form-control"   ngf-select="upload($file)">
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div style=" overflow-y:auto; width:100%; max-height:400px;">
                                <table>
                                    <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>用户名</th>
                                        <th>手机号码</th>
                                        <th>投资金额</th>
                                        <th>可用余额</th>
                                        <th>待还金额</th>
                                        <th>投资类型</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>

                                    <tbody>
                                    <tr ng-repeat="item in orderParams2">
                                        <td>{{$index +1 }}</td>
                                        <td>{{item.username}}</td>
                                        <td>{{item.mobile}}</td>
                                        <td>{{item.investTotalAmount}}元</td>
                                        <td>{{item.usable}}元</td>
                                        <td>{{item.repay}}元</td>
                                        <td>{{item.type | userType}}</td>
                                        <td> <a  ng-click="deleteUserModal($index)">删除</a></td>
                                    </tr>
                                    </tbody>

                                </table>
                            </div>
                        </div>
                    </div>
                    <div ng-if="!isCreate">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <div class="col-md-10">
                                            <label class="radio-inline">
                                                <input type="radio" name="ruleChild11"  value='0' ng-model="ctrlScope.rule.usersType" disabled>
                                                所有人 </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="ruleChild11"  value='1' ng-model="ctrlScope.rule.usersType" disabled>
                                                条件筛选 </label>

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div ng-if="ctrlScope.rule.usersType==1">
                            <div style=" overflow-y:auto; width:100%; max-height:400px;">
                                <table>
                                    <thead>
                                    <tr>
                                        <th>用户名</th>
                                        <th>手机号码</th>
                                        <th>投资金额</th>
                                        <th>可用余额</th>
                                        <th>待还金额</th>
                                        <th>投资类型</th>
                                    </tr>
                                    </thead>

                                    <tbody>
                                    <tr ng-repeat="item in orderParams4">
                                        <td>{{item.username}}</td>
                                        <td>{{item.mobile}}</td>
                                        <td>{{item.investTotalAmount}}元</td>
                                        <td>{{item.usable}}元</td>
                                        <td>{{item.repay}}元</td>
                                        <td>{{item.type | userType }}</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div >
                </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue"   ng-disabled="myForm.$invalid" >完成</button>
            </div>
        </div>
            </div>
    </form>
</modal>

<modal title="红包规则查看" visible="viewItemModal">
    <form class="form-horizontal" role="form" name="myForm">
        <div class="form-body">
            <ul  class="nav nav-tabs">
                <li class="active"><a  href="#item11" data-toggle="tab">红包规则</a></li>
                <li><a  href="#item21" data-toggle="tab">红包内容</a></li>
                <li><a  href="#item31" data-toggle="tab">用户筛选</a></li>
            </ul>
            <div class="tab-content" style="margin-top:10px;">
                <div class="tab-pane fade in active" id="item11" >
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">活动名称</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" readonly   name="itemName" ng-model="ctrlScope.rule.name">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">规则有效期</label>
                                <div class="col-md-3">
                                    <input type="text" class="form-control"  readonly   ng-value="ctrlScope.rule.beginTime |  date:'yyyy-MM-dd  HH:mm:ss'">
                                </div>
                                <div class="col-md-3">
                                    <input type="text" class="form-control"  readonly   ng-value="ctrlScope.rule.endTime  |date:'yyyy-MM-dd  HH:mm:ss'">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">触发规则</label>
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <label class="radio-inline">
                                                <input type="radio" name="rule" value="1" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                立即发放 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="10" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                分享 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="11" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                拉新 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="12" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                单次投资金额 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="14" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                期限内投资总额 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="8" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                充值</label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="9" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                自动锁标</label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="13" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                兑换码</label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="rule" value="15" ng-model="ctrlScope.ruleParent.nid" disabled>
                                                注册</label>

                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="row" ng-if="ctrlScope.ruleParent.nid==13">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">输入兑换码</label>
                                <div class="col-md-8">
                                    <input type="number" class="form-control"  ng-model="ctrlScope.rule.redeemCode" disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" ng-if="ctrlScope.ruleParent.nid==10">
                        <div class="col-md-2">
                            <div class="form-group">
                                <label class="control-label col-md-12">分享方式</label>
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="form-group">

                                <div class="col-md-6">
                                    <label class="radio-inline">
                                        <input type="radio" name="ruleChild1"  value='2' ng-model="ctrlScope.rule1.nid" disabled>
                                        标的 </label>

                                    <label class="radio-inline">
                                        <input type="radio" name="ruleChild1"  value='3' ng-model="ctrlScope.rule1.nid" disabled>
                                        邀请 </label>

                                </div>

                            </div>
                        </div>
                    </div>

                    <div class="row"  ng-if="ctrlScope.ruleParent.nid==11">
                        <div class="col-md-2">
                            <div class="form-group">
                                <label class="control-label col-md-12">拉新方式</label>
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="form-group">

                                <div class="col-md-6">
                                    <label class="radio-inline">
                                        <input type="radio" name="ruleChild2"  value='4' ng-model="ctrlScope.rule2.nid" disabled>
                                        实名认证 </label>

                                    <label class="radio-inline">
                                        <input type="radio" name="ruleChild2" value='5'  ng-model="ctrlScope.rule2.nid" disabled>
                                        首次投资 </label>

                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" ng-if="ctrlScope.ruleParent.nid==12">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4 radio-inline">
                                    <input type="radio" name="ruleChild3" value='6'  ng-model="ctrlScope.rule3.nid" disabled>
                                    投资满额 </label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" ng-value="ctrlScope.rule.minimumAmount6+'元'" readonly>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4 radio-inline">
                                    <input type="radio" name="ruleChild3" value='7'  ng-model="ctrlScope.rule3.nid" disabled>
                                    首次投资 </label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control"  ng-value="ctrlScope.rule.minimumAmount7+'元'" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" ng-if="ctrlScope.ruleParent.nid==8">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">充值满额 </label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control"  ng-value="ctrlScope.rule.minimumAmount8+'元'" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" ng-if="ctrlScope.ruleParent.nid==14">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">投资总额</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control"  ng-value="ctrlScope.rule.minimumAmount9+'元'" readonly>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" ng-if="ctrlScope.ruleParent.nid==9">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">自动锁标期限</label>
                                <div class="col-md-8">
                                    <input type="number" class="form-control"  ng-value="ctrlScope.rule.days+'天'" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">限领类型</label>
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <label class="radio-inline">
                                                <input type="radio" name="limit" value="0" ng-model="ctrlScope.rule.limitType" disabled>
                                                每日限领 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="limit" value="1" ng-model="ctrlScope.rule.limitType" disabled>
                                                总限领 </label>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">限领次数</label>
                                <div class="col-md-8">
                                    <input type="number" class="form-control"   ng-model="ctrlScope.rule.totalLimit" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">总发放数量</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control"   ng-model="ctrlScope.rule.totalCount" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-md-4">跳转地址</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control"   ng-model="ctrlScope.rule.jumpPage" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">是否启用通知</label>
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <label class="radio-inline">
                                                <input type="radio" name="announce1" value="1" ng-model="ctrlScope.ruleAnnounce.announce" disabled>
                                                是 </label>
                                            <label class="radio-inline">
                                                <input type="radio"   name="announce1" value="0" ng-model="ctrlScope.ruleAnnounce.announce" disabled>
                                                否 </label>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="row" ng-if="ctrlScope.ruleAnnounce.announce==1">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">通知方式</label>
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <label class="checkbox-inline">
                                                <input type="checkbox"  ng-model="ctrlScope.ruleAnnounce.whetherSms" disabled>
                                                短信 </label>
                                            <label class="checkbox-inline">
                                                <input type="checkbox"  ng-model="ctrlScope.ruleAnnounce.whetherMail" disabled>
                                                站内信 </label>
                                            <label class="checkbox-inline">
                                                <input type="checkbox" ng-model="ctrlScope.ruleAnnounce.whetherAppPush" disabled>
                                                app推送 </label>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <!--<div class="col-md-12">-->
                            <!--<div class="form-group">-->
                                <!--<label class="control-label col-md-2">发送时间</label>-->

                                <!--<div class="col-md-3">-->

                                    <!--<p class="input-group inline">-->
                                        <!--<input type="text" class="form-control"  placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"-->
                                               <!--ng-model="ctrlScope.user.beginInvestTimex" is-open="popup3.opened" datepicker-options="dateOptions"/>-->
                                        <!--<span class="input-group-btn">-->
                                        <!--<button type="button" class="btn btn-default" ng-click="open3()"><i-->
                                                <!--class="glyphicon glyphicon-calendar"></i></button>-->
                                        <!--</span>-->
                                    <!--</p>-->

                                <!--</div>-->
                                <!--<div class="coll-md-1">-->
                                    <!--<select ng-model="message.hour" class="form-control" ui-select2="selectOptions" required>-->
                                        <!--<option value="" disabled selected hidden>时</option>-->
                                        <!--<option ng-repeat="hour in getHours()" value="{{hour}}">{{hour}}</option>-->
                                    <!--</select>-->
                                <!--</div>-->
                                <!--<div class="coll-md-1">-->
                                    <!--<select ng-model="message.min" class="form-control" ui-select2="selectOptions" required>-->
                                        <!--<option value="" disabled selected hidden>分</option>-->
                                        <!--<option ng-repeat="min in getMins()" value="{{min}}">{{min}}</option>-->
                                    <!--</select>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->

                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-2">通知内容</label>
                                <div class="col-md-10">
                                    <textarea ng-model="ctrlScope.rule.noticeContent" readonly></textarea>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                <div id="item21" class="tab-pane fade">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <div class="col-md-12">
                                    <div class="col-md-10">
                                        <label class="radio-inline">
                                            <input type="radio" name="type"  value='1' ng-model="ctrlScope.rule.ticketType" disabled>
                                            红包 </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="type"  value='2' ng-model="ctrlScope.rule.ticketType" disabled>
                                            加息券 </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="type"  value='3' ng-model="ctrlScope.rule.ticketType" disabled>
                                            抽奖券 </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ng-if="ctrlScope.rule.ticketType==1">
                        <div style=" overflow-y:auto; width:100%; max-height:400px;">
                            <table>
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>红包金额</th>
                                    <th>可用门槛</th>
                                    <th>有效期</th>
                                    <th>标的满足天数</th>
                                </tr>
                                </thead>

                                <tbody>
                                <tr ng-repeat="item in orderParams3">
                                    <td>{{$index + 1}}</td>
                                    <td>{{item.amount}}元</td>
                                    <td>{{item.requireAmount}}元</td>
                                    <td>{{item.expiredLife}}天</td>
                                    <td>{{item.scope}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div ng-if="ctrlScope.rule.ticketType==2">
                        <div style=" overflow-y:auto; width:100%; max-height:400px;">
                            <table>
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>作用时间</th>
                                    <th>加息利率</th>
                                    <th>可用门槛</th>
                                    <th>有效期</th>
                                    <th>标的满足天数</th>
                                </tr>
                                </thead>

                                <tbody>
                                <tr ng-repeat="item in orderParams3">
                                    <td>{{$index + 1}}</td>
                                    <td>{{item.usefulLife}}天</td>
                                    <td>{{item.rate}}%</td>
                                    <td>{{item.requireAmount}}元</td>
                                    <td>{{item.expiredLife}}天</td>
                                    <td>{{item.scope}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div ng-if='ctrlScope.rule.ticketType==3'>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label col-md-4">有效期</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control"  readonly  ng-value="ctrlScope.content.expired+'天'">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="item31" class="tab-pane fade">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <div class="col-md-12">
                                    <div class="col-md-10">
                                        <label class="radio-inline">
                                            <input type="radio" name="ruleChild11"  value='0' ng-model="ctrlScope.rule.usersType" disabled>
                                            所有人 </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="ruleChild11"  value='1' ng-model="ctrlScope.rule.usersType" disabled>
                                            条件筛选 </label>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ng-if="ctrlScope.rule.usersType==1">
                        <div style=" overflow-y:auto; width:100%; max-height:400px;">
                            <table>
                                <thead>
                                <tr>
                                    <th>用户名</th>
                                    <th>ID</th>
                                    <th>状态</th>
                                    <th>手机号码</th>
                                    <th>投资金额</th>
                                    <th>可用余额</th>
                                    <th>待还金额</th>
                                    <th>投资类型</th>
                                </tr>
                                </thead>

                                <tbody>
                                <tr ng-repeat="item in orderParams4">
                                    <td>{{item.username}}</td>
                                    <td>{{item.id}}</td>
                                    <td>{{item.status | ruleStatus}}</td>
                                    <td>{{item.mobile}}</td>
                                    <td>{{item.investTotalAmount}}元</td>
                                    <td>{{item.usable}}元</td>
                                    <td>{{item.repay}}元</td>
                                    <td>{{item.type | userType }}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="buttonArea col-md-12">
                <button type="button" class="btn blue"   ng-click="close()" >关闭</button>
            </div>
            </div>

    </form>
</modal>

<modal title="审核" visible="checkItemModal" style="margin:250px auto;">
    <form class="form-horizontal" role="form">
        <div class="form-body">
            <div class="row">
                <div class="col-md-12">
                    <label class="radio-inline">
                        <input type="radio" name="ruleChcek" value="1" ng-model="ctrlScope.Checkrule.status" required>
                        通过 </label>
                    <label class="radio-inline">
                        <input type="radio"   name="ruleChcek" value="3" ng-model="ctrlScope.Checkrule.status" required>
                        退回 </label>
                </div>
            </div>
            <div class="buttonArea col-md-12">
                <button type="button"  class="btn blue" ng-click="submit()">确定</button>
            </div>
        </div>
    </form>
</modal>

<modal title="停用红包" visible="stopItemModal" style="margin:250px auto;">
    <form class="form-horizontal" role="form">
        <div class="form-body">
            <div class="row col-md-12">
                <label>是否停用红包？</label>
            </div>
            </div>
            <div class="buttonArea col-md-12">
                <button type="button"  class="btn blue" ng-click="confirmStop()" ng-disabled="onOffToStop">确定</button>
                <button type="button"  class="btn" ng-click="confirmNotStop()">取消</button>
            </div>
        </div>
    </form>
</modal>

<modal title="启用红包" visible="startItemModal" style="margin:250px auto;">
    <form class="form-horizontal" role="form">
        <div class="form-body">
            <div class="row col-md-12">
                <label>是否启用红包？</label>
            </div>
        </div>
        <div class="buttonArea col-md-12">
            <button type="button"  class="btn blue" ng-click="confirmStart()" ng-disabled="onOffToStart">确定</button>
            <button type="button"  class="btn" ng-click="confirmNotStart()">取消</button>
        </div>
        </div>
    </form>
</modal>